﻿Imports AutoCAD

''' <summary>
''' CAD绘图服务
''' 【作用】
''' 1、绘制多段线
''' 2、绘制矩形
''' 3、绘制正方形
''' 4、绘制圆形
''' 5、绘制直线
''' </summary>
Public Interface ICadDrawService

    ''' <summary>
    ''' 绘制多段线, 根据坐标集合绘制多段线
    ''' </summary>
    ''' <param name="ms"> 模型空间 </param>
    ''' <returns></returns>
    Function DrawPL(ByRef ms As IAcadBlock, ByRef coordinates As Double()) As AcadLWPolyline

    ''' <summary>
    ''' 绘制矩形, 以0,0,0点为启点逆时针方向绘制矩形
    ''' </summary>
    ''' <param name="ms"> 模型空间 </param>
    ''' <param name="sx"> x长度 </param>
    ''' <param name="sy"> y长度 </param>
    ''' <returns></returns>
    Function DrawRec(ByRef ms As IAcadBlock, ByVal sx As Double, ByVal sy As Double) As AcadLWPolyline

    ''' <summary>
    ''' 绘制正方形, 以0,0,0点为启点逆时针方向绘制矩形
    ''' </summary>
    ''' <param name="ms"> 模型空间 </param>
    ''' <param name="sideLength"> 边长 </param>
    ''' <returns></returns>
    Function DrawSquare(ByRef ms As IAcadBlock, ByVal sideLength As Double) As AcadLWPolyline

    ''' <summary>
    ''' 绘制多段线圆形, 以0,0,0点为中心点逆时针绘制圆形, 该圆形实际为两个半圆多段线组成
    ''' </summary>
    ''' <param name="ms"> 模型空间 </param>
    ''' <param name="diameter"> 直径 </param>
    ''' <returns></returns>
    Function DrawCircle(ByRef ms As IAcadBlock, ByRef diameter As Double) As AcadLWPolyline

    ''' <summary>
    ''' 绘制圆形, 以0,0,0点为中心点逆时针绘制圆形, 该圆形实际为两个半圆多段线组成
    ''' </summary>
    ''' <param name="ms"> 模型空间 </param>
    ''' <param name="diameter"> 直径 </param>
    ''' <returns></returns>
    Function DrawCircle2(ByRef ms As IAcadBlock, ByRef diameter As Double) As AcadCircle

    ''' <summary>
    ''' 绘制点
    ''' </summary>
    ''' <param name="p"></param>
    ''' <returns></returns>
    Function DrawPoint(ByRef ms As IAcadBlock, ByRef p() As Double) As AcadPoint

    ''' <summary>
    ''' 创建块
    ''' </summary>
    ''' <param name="doc"> 文档 </param>
    ''' <param name="name"> 块名称 </param>
    ''' <returns></returns>
    Function CreateBlock(ByRef doc As AcadDocument, ByVal name As String) As AcadBlock



    ''' <summary>
    ''' 块重命名
    ''' </summary>
    ''' <param name="blk"> 块 </param>
    Sub BlockRename(ByRef blk As AcadBlock, ByVal name As String)



End Interface
